from tortoise import fields
from .base import BaseModel, TimestampMixin

class CameraConfig(BaseModel, TimestampMixin):
    """相机配置"""
    
    camera_type = fields.CharField(max_length=50, description="相机类型", index=True)
    frame_rate = fields.IntField(description="图像采集帧率")
    exposure_time = fields.IntField(description="图像采集曝光时间")
    gain = fields.FloatField(description="增益")
    agc = fields.BooleanField(description="自动增益", default=False)
    resolution = fields.CharField(max_length=20, description="分辨率")

    class Meta:
        table = "camera_config"
        table_description = "相机配置表" 